/*
 * File: p6_Model_Reference.c
 *
 * Code generated for Simulink model 'p6_Model_Reference'.
 *
 * Model version                  : 1.3
 * Simulink Coder version         : 25.1 (R2025a) 21-Nov-2024
 * C/C++ source code generated on : Sat Aug 23 11:12:48 2025
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Intel->x86-64 (Windows64)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "p6_Model_Reference.h"
#include "rtwtypes.h"
#include "p6_Model_Reference_private.h"
#include "myAdd.h"

/* Block states (default storage) */
DW_p6_Model_Reference_T p6_Model_Reference_DW;

/* Real-time model */
static RT_MODEL_p6_Model_Reference_T p6_Model_Reference_M_;
RT_MODEL_p6_Model_Reference_T *const p6_Model_Reference_M =
  &p6_Model_Reference_M_;

/* Model step function */
void p6_Model_Reference_step(void)
{
  real_T rtb_Model;

  /* ModelReference: '<Root>/Model' incorporates:
   *  Constant: '<Root>/Constant'
   *  Constant: '<Root>/Constant1'
   */
  myAdd(&rtCP_Constant_Value, &rtCP_Constant1_Value, &rtb_Model);

  /* ModelReference: '<Root>/Model1' incorporates:
   *  Constant: '<Root>/Constant2'
   *  Constant: '<Root>/Constant3'
   */
  myAdd(&rtCP_Constant2_Value, &rtCP_Constant3_Value, &rtb_Model);
}

/* Model initialize function */
void p6_Model_Reference_initialize(void)
{
  /* Model Initialize function for ModelReference Block: '<Root>/Model' */
  myAdd_initialize(rtmGetErrorStatusPointer(p6_Model_Reference_M),
                   &(p6_Model_Reference_DW.Model_InstanceData.rtm));

  /* Model Initialize function for ModelReference Block: '<Root>/Model1' */
  myAdd_initialize(rtmGetErrorStatusPointer(p6_Model_Reference_M),
                   &(p6_Model_Reference_DW.Model1_InstanceData.rtm));
}

/* Model terminate function */
void p6_Model_Reference_terminate(void)
{
  /* (no terminate code required) */
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
